-- [ja] SM5Beta2でスコアがまともに機能しなくなるというアップデートをやらかしてくださったのでゴリ押し対応 

local pn=...;
local old_score={0.0};
local t=Def.ActorFrame{};
local p=((pn==PLAYER_1) and 1 or 2);
local tcol=GetUserPref_Theme("UserColorPath");
t[#t+1]=Def.ActorFrame{
	LoadActor(""..tcol.."ScoreFrame")..{
		OnCommand=cmd(draworder,100;player,pn;zoomy,0;sleep,0.8;linear,0.2;zoomy,0.7;);
		OffCommand=cmd(sleep,0.3;linear,0.2;zoomy,0;);
	};
};
t[#t+1]=Def.ActorFrame{
	Def.RollingNumbers {
		File=THEME:GetPathF("Common","Normal");
		InitCommand=cmd(Load,"RollingNumbers";y,-2;targetnumber,0.1;settext,0;);
		Name="ScP"..p;
		OnCommand=function(self)
			if p==1 then
				(cmd(zoomx,0.8;zoomy,0;sleep,0.8;player,PLAYER_1;diffuse,PlayerColor(PLAYER_1);strokecolor,Color("Outline");
					diffusetopedge,BoostColor(PlayerColor(PLAYER_1),1.5);linear,0.2;zoomy,0.8;))(self);
			else
				(cmd(zoomx,0.8;zoomy,0;sleep,0.8;player,PLAYER_2;diffuse,BoostColor(PlayerColor(PLAYER_2),1.5);strokecolor,Color("Outline");
					diffusetopedge,BoostColor(PlayerColor(PLAYER_2),1.8);linear,0.2;zoomy,0.8;))(self);
			end;
		end;
		OffCommand=sleep,0.3;linear,0.2;zoomy,0;
	};
	JudgmentMessageCommand = function(self, params)
		if params.Player==PLAYER_1 then
			self:queuecommand("ScoreP1");
		else
			self:queuecommand("ScoreP2");
		end;
	end;
	ScoreP1Command=function(self)
		local s=self:GetChild("ScP1");
		if CustomScore_SM5b2_Get(PLAYER_1)~=old_score[1] then
			s:targetnumber(CustomScore_SM5b2_Get(PLAYER_1));
			s:settext(CustomScore_SM5b2_Get(PLAYER_1));
			old_score[1]=CustomScore_SM5b2_Get(PLAYER_1);
		end;
	end;
	ScoreP2Command=function(self)
		local s=self:GetChild("ScP2");
		if CustomScore_SM5b2_Get(PLAYER_2)~=old_score[2] then
			s:targetnumber(CustomScore_SM5b2_Get(PLAYER_2));
			s:settext(CustomScore_SM5b2_Get(PLAYER_2));
			old_score[2]=CustomScore_SM5b2_Get(PLAYER_2);
		end;
	end;
};
return t;